import {request} from "@/network/request";

export function getPermissionListType(){
    return request({
        url: '/admin/permission/listType',
        method: 'get'
    })
}

//获取所有权限 只包含id parent_id resource_name
export function getAllPermissionSimple(){
    return request({
        url: '/admin/permission/list2SimpleTree',
        method: 'get'
    })
}
//获取所有完整权限
export function getAllPermission(){
    return request({
        url: '/admin/permission/list',
        method: 'get'
    })
}
export function addPermission(permission){
    return request({
        url: '/admin/permission/add',
        method: 'post',
        data:permission
    })
}
export function updatePermission(permission){
    return request({
        url: '/admin/permission/update',
        method: 'post',
        data:permission
    })
}